<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<base target="_self">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>税控查验</title>
<link rel="stylesheet" type="text/css" href="css/common.css">
<script  charset="utf-8" type="text/javascript" src="js/jquery.min.js"></script>
<script  charset="utf-8" type="text/javascript" src="js/jquery.PrintArea.js"></script>
</head>

<body>
<div id="con_tent" class="clearfix"> <a href="#" id="dialogclose" >&times;</a>
  <div class="cms_r" id="cms_r">
    <div class="chayan_div">
      <div id="print_area" class="printdiv">
        <table border="1" class="comm_table" width="100%">
          <tbody>
            <tr class="result_title">
              <td colspan="4" style="background-color:#2498ef;"><span style="font-size:16px; color:#fff; float:left; line-height:40px;">结果： <strong id="cyjg">不一致</strong> <span style="padding-left:40px;" id="cysj">查验时间：2015-07-08 09:37:22</span></span> <span style="float:right">
                <button id="printfp" class="white_button" onmousemove="this.className='gray_button';" onmouseout="this.className='white_button';">打印</button>
                <button id="closebt" class="white_button" style="position:relative!important;z-index:100" onmousemove="this.className='green_button';" onmouseout="this.className='white_button';" onclick="window.close();">关闭</button>
                </span></td>
            </tr>
          </tbody>
        </table>
        <div id="bg_div" style="background:url(images/shuiyin.png) repeat; width:100%; position:absolute;left:0px; top:0px;z-index:99;"></div>
        <div id="tabPage2">
          <h1 id="fpcc_tl" style="color:#574B9D;padding:5px 0px 5px 0px; text-align:center;"><strong>北京增值税专用发票</strong></h1>
          <table border="0" class="comm_table" cellpadding="0" cellspacing="0" style="width:100%">
            <tbody>
              <tr>
                <td class="align_center " width="40%" style="background:#F3F8FC ">发票代码：</td>
                <td class="align_left " width="200px"><span class="content_td_blue" id="fp_dm"></span></td>
              </tr>
              <tr>
                <td class="align_center " width="40%" style="background:#F3F8FC ">发票号码：</td>
                <td class="align_left " width="200px"><span class="content_td_blue" id="fp_hm"></span></td>
              </tr>
              <tr>
                <td class="align_center " width="40%" style="background:#F3F8FC ">开票日期：</td>
                <td class="align_left "><span class="content_td_blue" id="kp_rq"></span></td>
              </tr>
              <tr>
                <td class="align_center " width="40%" style="background:#F3F8FC " id="kjje_con"></td>
                <td class="align_left "><span class="content_td_blue" id="kj_je"></span></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <!--原始信息  end-->
      <div style="padding:30px 35px 0px 0px; color:#999;"> 说明：发票信息不符时不得作为财务报销凭证，任何单位和个人有权拒收并举报！ </div>
    </div>
  </div>
</div>
<!--content end--> 
<script type="text/javascript">
var browser = sessionStorage["browser"];
var data ;
if (browser == "edge") {
	var edgedata = sessionStorage["result"]; //json字符串
	data = JSON.parse(edgedata);
} else {	
    data = window.dialogArguments;
}
  var fpdm=data.fpdm;
  var fphm=data.fphm;
  var kprq=data.kprq;
  var kjje=data.kjje;
  var fplx=data.fplx;
  var swjgmc=data.swjg;
  var cysj=data.cysj;
  var setText = data.setText;

  var fplb="";
  if(fplx=="01"){
    fplb="增值税专用发票";
  }else if(fplx=="02"){
    fplb="货物运输业增值税专用发票";
  }else if(fplx=="03"){
    fplb="机动车销售统一发票";
  }else if(fplx=="04"){
    fplb="增值税普通发票";
  }else if(fplx=="10"){
    fplb="增值税电子普通发票";
  }else if(fplx=="11"){
    fplb="增值税普通发票（卷票）";
  }

  $(document).ready(function(){
	if (browser == "ie8") {
		$('#closebt').hide();
		$("#dialogclose").hide();
	} else {
		$("#dialogclose").hide();
	}

	/*
	if (browser == "edge") {
		  $("#dialogclose").show();
		  document.getElementById('dialogclose').addEventListener('click', function(e) {
			  $("#cover").hide();
		  });
	  } else {
		  $("#dialogclose").hide();
	  }*/
    $('#cysj').text("查验时间："+cysj);
    $('#fpcc_tl').text(swjgmc+fplb);
    if(fplx=="04"||fplx=="10"||fplx=="11"){
      $('#kjje_con').text('校验码：');
    }else if(fplx=="03"){
      $('#kjje_con').text('不含税价：');
    }else if(fplx=="02"){
      $('#kjje_con').text('合计金额：');
    }else if(fplx=="01"){
      $('#kjje_con').text('开具金额：');
    }
	  $('#fp_dm').text(fpdm);
      $('#fp_hm').text(fphm);
      $('#kp_rq').text(kprq);
      $('#kj_je').text(kjje);

      $('#cyjg').text(setText);

  });

  $("button#printfp").click(function(){ 
    $("button#printfp").hide();
	$("button#closebt").hide();
    $("div#print_area").printArea(); 
	if (browser == "ie8") {
	} else {
		$("button#closebt").show();
	}
    $("button#printfp").show();
  }); 
  $("button#closebt").click(function(){
	if (browser == "edge" || browser == "ie8" || browser == "firefox") {
		document.getElementById("floatwin1").innerHTML="";
		$("#cover").hide();
		$("#floatwin1").hide();
	} else {
		parent.document.getElementById("dialog-body").contentWindow.document.body.innerText = "";
		parent.dalog.close();
	}
	if (browser == "edge" ) {
		//window.parent.location.reload();
	}
  }); 

  </script>
</body>
</html>
